package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ShopBottomInfoMapper;
import com.ruoyi.system.domain.ShopBottomInfo;
import com.ruoyi.system.service.IShopBottomInfoService;

/**
 * 底部栏信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-03
 */
@Service
public class ShopBottomInfoServiceImpl implements IShopBottomInfoService 
{
    @Autowired
    private ShopBottomInfoMapper shopBottomInfoMapper;

    /**
     * 查询底部栏信息
     * 
     * @param bottomId 底部栏信息主键
     * @return 底部栏信息
     */
    @Override
    public ShopBottomInfo selectShopBottomInfoByBottomId(Long bottomId)
    {
        return shopBottomInfoMapper.selectShopBottomInfoByBottomId(bottomId);
    }

    /**
     * 查询底部栏信息列表
     * 
     * @param shopBottomInfo 底部栏信息
     * @return 底部栏信息
     */
    @Override
    public List<ShopBottomInfo> selectShopBottomInfoList(ShopBottomInfo shopBottomInfo)
    {
        return shopBottomInfoMapper.selectShopBottomInfoList(shopBottomInfo);
    }

    /**
     * 新增底部栏信息
     * 
     * @param shopBottomInfo 底部栏信息
     * @return 结果
     */
    @Override
    public int insertShopBottomInfo(ShopBottomInfo shopBottomInfo)
    {
        shopBottomInfo.setCreateTime(DateUtils.getNowDate());
        return shopBottomInfoMapper.insertShopBottomInfo(shopBottomInfo);
    }

    /**
     * 修改底部栏信息
     * 
     * @param shopBottomInfo 底部栏信息
     * @return 结果
     */
    @Override
    public int updateShopBottomInfo(ShopBottomInfo shopBottomInfo)
    {
        shopBottomInfo.setUpdateTime(DateUtils.getNowDate());
        return shopBottomInfoMapper.updateShopBottomInfo(shopBottomInfo);
    }

    /**
     * 批量删除底部栏信息
     * 
     * @param bottomIds 需要删除的底部栏信息主键
     * @return 结果
     */
    @Override
    public int deleteShopBottomInfoByBottomIds(Long[] bottomIds)
    {
        return shopBottomInfoMapper.deleteShopBottomInfoByBottomIds(bottomIds);
    }

    /**
     * 删除底部栏信息信息
     * 
     * @param bottomId 底部栏信息主键
     * @return 结果
     */
    @Override
    public int deleteShopBottomInfoByBottomId(Long bottomId)
    {
        return shopBottomInfoMapper.deleteShopBottomInfoByBottomId(bottomId);
    }
}
